//
//  PasswordView.m
//  TravelFirst
//
//  Created by lanou3g on 15/9/22.
//  Copyright (c) 2015年 吴娅君. All rights reserved.
//

#import "PasswordView.h"

@implementation PasswordView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
        UILabel *lable = [[UILabel alloc] initWithFrame:CGRectMake(20,  120, 80, 30)];
        lable.text = @"邮箱地址";
        lable.textAlignment = NSTextAlignmentLeft;
        [self addSubview:lable];
        
        UITextField *field = [[UITextField alloc] initWithFrame:CGRectMake(kWidth - 200, 120 , 180, 30)];
        field.placeholder = @"请输入邮箱地址";
        field.textAlignment = NSTextAlignmentRight;
        field.userInteractionEnabled = YES;
        field.font = [UIFont fontWithName:@"Arial" size:20.0f];
        field.tag = 100;
        [self addSubview:field];
        
        UIView *line = [[UIView alloc] initWithFrame:CGRectMake(10,  150, kWidth - 20, 1)];
        line.backgroundColor = [UIColor grayColor];
        [self addSubview:line];
        
        UIButton *butt = [[UIButton alloc] initWithFrame:CGRectMake(15, 200, kWidth - 30, 40)];
        [butt setTitle:@"找回密码" forState:(UIControlStateNormal)];
        [butt setContentHorizontalAlignment:UIControlContentHorizontalAlignmentCenter];
        //设置边框
        [butt.layer setMasksToBounds:YES];
        [butt.layer setCornerRadius:8.0];
        [butt.layer setBorderWidth:1.0];
        [butt.layer setBorderColor:[[UIColor blueColor] CGColor]];
        [butt setTitleColor:[UIColor blueColor] forState:(UIControlStateNormal)];
        butt.tag = 500;
        [self addSubview:butt];
    }
    return self;
}

@end
